using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class HIENTRANGHONNHANModel : ObjModel<HIENTRANGHONNHAN>, IModelConverter
	{

		#region Constructor

		public HIENTRANGHONNHANModel()
			: base()
		{
		}

		public HIENTRANGHONNHANModel(HIENTRANGHONNHAN obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid? _mahientranghonnhan;

		private System.String _tenhientranghonnhan;

		private System.Int32? _priority;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAHIENTRANGHONNHAN
		{
			get
			{
				return _mahientranghonnhan;
			}
			set
			{
				_mahientranghonnhan = value;
			}
		}

		//[Store]
        [Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENHIENTRANGHONNHAN
		{
			get
			{
				return _tenhientranghonnhan;
			}
			set
			{
				_tenhientranghonnhan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? PRIORITY
		{
			get
			{
				return _priority;
			}
			set
			{
				_priority = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(HIENTRANGHONNHANModel);
		}
		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<HIENTRANGHONNHAN>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override HIENTRANGHONNHAN ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator HIENTRANGHONNHANModel(HIENTRANGHONNHAN obj)
		{
			return new HIENTRANGHONNHANModel(obj);
		}
		public static implicit operator HIENTRANGHONNHAN(HIENTRANGHONNHANModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
